<?php 

function option($items, $parent_id, $cat_id, $level=0) {
    foreach ($items as $item) {
        if ($item['id']==$cat_id) continue;
        
        $selected = ($item['id']==$parent_id) ? 'selected' : '';
        echo '<option value="'.$item['id'].'" '.$selected.'>';
        echo str_repeat('├─', $level).$item['name'];
        if (isset($item['children']) && is_array($item['children'])) {
            option($item['children'], $parent_id, $cat_id, $level+1);
        }
        echo '</option>';
    }
}
?>
<style>
.max-line1 {
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;	
}
.max-line2 {
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
</style>
<style>
.media-body .summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
	text-overflow: ellipsis;
    overflow: hidden;
}
.media-list img {width: 200px;}
@media (max-width: 425px)  {
    .media-list img {width: 115px;}	
    .media-body .summary {display: none;}
}
</style>

<h3 class="page-header">项目回收站列表
    <a href="<?= URL::site('projectDemo/really_allDel');?>" onclick="return confirm('确定将所有记录删除？')" class="btn btn-info btn-xs ajax-del">全部删除</a>
<!--    <a href="--><?//= URL::site('projectDemo/allBack');?><!--" onclick="return confirm('确定将所有记录恢复？')" class="btn btn-info btn-xs ajax-del">全部恢复</a>-->

</h3>



<div class="table-responsive">
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>项目名称</th>
            <th>项目类型</th>
            <th>项目行业</th>
            <th>拍摄时长</th>
            <th>拍摄城市</th>
            <th>预算</th>
            <th>操作</th>

        </tr>
        </thead>
        <tbody id="cat-list">
        <?php foreach ($model as $item):?>
            <tr>
                <td><a href="<?= URL::site('projectDemo/edit?id='.$item['id']);?>"><?= $item['project_name'] ?></a></td>
                <td>
                    <?= $item['project_cid_name'] ?>
                </td>
                <td>
                    <?= $item['profession_cid_name'] ?>
                </td>
                <td>
                    <?= $item['video_time'] ?>/天
                </td>
                <td>
                    <?= $item['city'] ?>
                </td>
                <td>
                    <?= $item['actual_budget'] ?>
                </td>
                <td>
                    <a href="<?= URL::site('projectDemo/really_del?id='.$item['id']);?>" onclick="return confirm('确定将这条记录删除？')" class="btn btn-info btn-xs ajax-del">删除</a>
                    <a href="<?= URL::site('projectDemo/back?id='.$item['id']);?>" onclick="return confirm('确定将这条记录恢复？')" class="btn btn-info btn-xs ajax-del">恢复</a>
                </td>

            </tr>
        <?php endforeach;?>
        </tbody>

    </table>

</div>



